 <template>
    <div>
    <el-dialog :visible.sync="historyParams.open" :title="historyParams.title" width="600px" append-to-body >
        <el-form :model="queryParams" ref="queryForm" :inline="true">
            <el-form-item label="任务名称: " prop="title">
                <el-input
                v-model="queryParams.activityName"
                placeholder="请输入任务名称"
                clearable
                size="small"
                @keyup.enter.native="handleQuery"
                />
            </el-form-item>
            <el-form-item label="办理人ID: " prop="instanceId" >
                <el-input
                v-model="queryParams.assignee"
                placeholder="请输入办理人ID"
                clearable
                size="small"
                @keyup.enter.native="handleQuery"
                />
            </el-form-item>
            <el-form-item>
                <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
                <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
            </el-form-item>
        </el-form>

        <el-table v-loading="loading" :data="leaveList" >
            <el-table-column label="任务名称" align="center" prop="activityName" min-width="12%" />
            <el-table-column label="办理人ID" align="center" prop="assignee" min-width="12%" />
            <el-table-column label="办理人" align="center" prop="assigneeName" min-width="12%" />
            <el-table-column label="审批意见" align="center" prop="comment" min-width="12%" />
            <el-table-column label="开始时间" align="center" prop="startTime" min-width="12%" >
                <template slot-scope="scope">
                <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
                </template>
            </el-table-column>
            <el-table-column label="结束时间" align="center" prop="endTime" min-width="10%" >
                <template slot-scope="scope">
                <span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
                </template>
            </el-table-column>
            <el-table-column label="耗时" align="center" prop="durationInMillis" min-width="10%" />
        </el-table>
    </el-dialog>
    </div>
</template>
<script> 
    export default {
        name: 'historyDialog',
        data() {
    
        },
        props: {
            historyParams: {
                open: {
                    type: Boolean,
                    default: false
                },
                title: {
                    type: String,
                    default: ""
                }

            }
        },
        mounted() {
            //表单初始
        },
        methods: {
            
        }
    };
</script>
